package org.apache.ocean;

import java.util.*;
import org.apache.commons.lang.builder.*;
import org.apache.commons.lang.*;

/**
 *
 * @author jasonr
 */
public class HighlightRequest {
  public static String PRE_DEFAULT = "<em>";
  public static String POST_DEFAULT = "</em>";
  public SortedSet<String> highlightFields;
  public Integer highlightSnippets;
  public String pre;
  public String post;
  public String formatter;
  public Integer fragsize;
  
   public boolean equals(Object object) {
    if (!(object instanceof HighlightRequest)) return false;
    if (object == null) return false;
    HighlightRequest other = (HighlightRequest)object;
    return ObjectUtils.equals(highlightFields, other.highlightFields) 
    && ObjectUtils.equals(highlightSnippets, other.highlightSnippets) 
    && ObjectUtils.equals(pre, other.pre)
    && ObjectUtils.equals(post, other.post)
    && ObjectUtils.equals(formatter, other.formatter)
    && ObjectUtils.equals(fragsize, other.fragsize);
  }
  
  public int hashCode() {
    HashCodeBuilder builder = new HashCodeBuilder(89, 125);
    builder.append(highlightFields);
    builder.append(highlightSnippets);
    builder.append(pre);
    builder.append(post);
    builder.append(formatter);
    builder.append(fragsize);
    return builder.toHashCode();
  }

  public HighlightRequest() {
  }
  
}
